-
Notifications
You must be signed in to change notification settings - Fork 68
[RemoveLayoutConversions]: Reduce loop carried values #4915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tiotto, Ettore <[email protected]>
Signed-off-by: Tiotto, Ettore <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements an optimization to reduce loop carried values in the RemoveLayoutConversions pass by reusing equivalent loop results with layout conversion operations instead of carrying redundant values through loops.
- Adds logic to identify and replace redundant loop arguments with equivalent ones plus layout conversions
- Handles LoadOp and StoreOp operations that use these loop results
- Reduces memory usage and improves loop efficiency by eliminating unnecessary loop-carried tensor pointer values
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
RemoveLayoutConversions.cpp | Implements the core optimization logic to reduce loop carried values by replacing redundant arguments with conversions |
backward_combine_dpas_dot_layout.mlir | Adds test case to verify the optimization works correctly for tensor pointer operations in loops |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
third_party/intel/lib/TritonIntelGPUTransforms/RemoveLayoutConversions.cpp
Show resolved
Hide resolved
third_party/intel/lib/TritonIntelGPUTransforms/RemoveLayoutConversions.cpp
Show resolved
Hide resolved
third_party/intel/lib/TritonIntelGPUTransforms/RemoveLayoutConversions.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Tiotto, Ettore <[email protected]>
This PR implements an optimization to reduce loop carried values in the RemoveLayoutConversions pass by reusing equivalent loop results with layout conversion operations instead of carrying redundant values through loops.
Fixes issue #4901